<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<style>
			
			
			/* input[type=text]{
				color:red;
			} */
		</style>

		<!-- 生产 -->
		<script src="js/jquery.min.js"></script>

	</head>
	<body onload="">
		<input type="text" name="username"> <br>
		<input type="text" name="userinfo"> <br>
		<input type="password" name="password"> <br>
		<input type="radio" name="gender">  <input type="radio" name="gender"> <br>
		
		
		
		<ul>
			<li>鱼香肉丝0</li>
			<li>鱼香肉丝1</li>
			<li>鱼香肉丝2</li>
			<li>鱼香肉丝3</li>
			<li>鱼香肉丝4</li>
			<li>鱼香肉丝5</li>
			<li>鱼香肉丝6</li>
			<li>鱼香肉丝7</li>
			<li>鱼香肉丝8</li>
			<li>鱼香肉丝9</li>
		</ul>
		
		
		<script>
			
			// $("li").each(function (index,ele){
				
			// 	ele.style.color = index%2== 0 ?  "red":"green";
			// 	console.log("ele",$(ele))
			// })
			
			
			// $("li").each((index,ele)=>{
				
			// 	ele.style.color = index%2== 0 ?  "red":"green";
			// 	console.log("ele",$(ele))
			// })
			
			
			// $("li:odd").css("color","green");
			// $("li:even").css("color","red");
			
			
			$("li").css("color",function(index,item){
				return index%2== 0 ?  "red":"green"
			})
			
			
			
			// $("[type=text]").css("color","antiquewhite")
			$("[name^=user]").css("color","red")
			
			 // $("li:eq(5)").css("color","red");
			
		</script>

	</body>
</html>